﻿<UserControl x:Class="QUT.Bio.Util.LinkButton"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<UserControl.Resources>
		<Style x:Key="LinkButtonStyle"
			   TargetType="{x:Type Button}">

			<Setter Property="SnapsToDevicePixels"
					Value="true" />

			<Setter Property="OverridesDefaultStyle"
					Value="true" />

			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
						<TextBlock x:Name="tb"
								   Background="{x:Null}"
								   Cursor="Hand"
								   TextDecorations="Underline"
								   TextWrapping="Wrap">

                              <ContentPresenter VerticalAlignment="Center"
												RecognizesAccessKey="true" />
						</TextBlock>

						<ControlTemplate.Triggers>
							<Trigger Property="IsPressed"
									 Value="true">

								<Setter Property="Cursor"
										Value="Hand" />

								<Setter TargetName="tb"
										Property="BitmapEffect">
									<Setter.Value>
										<DropShadowBitmapEffect ShadowDepth="1"
																Direction="330"
																Color="Black"
																Opacity="0.5"
																Softness="0.25" />
									</Setter.Value>
								</Setter>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>

	<Button Click="ButtonClicked"
			Style="{StaticResource LinkButtonStyle}"
			Name="button"
			Foreground="Blue"
	/>

</UserControl>
